/*
 * InformeJuego.java
 *
 * Created on 31 de mayo de 2009, 06:08 PM
 */

package gui;

import java.lang.String;
import java.util.ArrayList;

/**
 *
 * @author  Arquitectura
 */
public class InformeJuego extends javax.swing.JFrame {
    
    /** Creates new form InformeJuego */
    public InformeJuego(ArrayList<String> jugadores, ArrayList<String> puntajes,int empates) {

        initComponents();
        xPnlFondo pnlFondo = new xPnlFondo(16);
        this.add(pnlFondo);
        this.pack();
        this.setSize(800, 635); //El 635 depende (alto) depende del Skin usado.
        this.setLocationRelativeTo(null);

        for(int i=0;i<jugadores.size();i++)
        {
            this.jtJugadores.append(jugadores.get(i)+"\n");
            this.jtPuntaje.append(puntajes.get(i)+"\n");
        }
        this.jlEmpates.setText(""+empates);
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jtJugadores = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        jtPuntaje = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        jlEmpates = new javax.swing.JLabel();
        jbCerrar = new javax.swing.JButton();

        jtJugadores.setColumns(20);
        jtJugadores.setRows(5);
        jScrollPane1.setViewportView(jtJugadores);

        jtPuntaje.setColumns(20);
        jtPuntaje.setRows(5);
        jScrollPane2.setViewportView(jtPuntaje);

        jLabel1.setText("Empates:");

        jbCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/BTN_cancelar.png"))); // NOI18N
        jbCerrar.setText("Cerrar");
        jbCerrar.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/BTN_cancelar_roll.png"))); // NOI18N
        jbCerrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCerrarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(185, 185, 185)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbCerrar)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jlEmpates))))
                .addContainerGap(192, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(188, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jlEmpates, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30)
                .addComponent(jbCerrar)
                .addGap(147, 147, 147))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-800)/2, (screenSize.height-600)/2, 800, 600);
    }// </editor-fold>//GEN-END:initComponents

    private void jbCerrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCerrarActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_jbCerrarActionPerformed
    
    /**
     * @param args the command line arguments
     */
    /*
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new InformeJuego(ArrayList<String> jugadores, ArrayList<String> puntajes,int empates).setVisible(true);
            }
        });
    }*/
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JButton jbCerrar;
    private javax.swing.JLabel jlEmpates;
    private javax.swing.JTextArea jtJugadores;
    private javax.swing.JTextArea jtPuntaje;
    // End of variables declaration//GEN-END:variables
    
}
